Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for add_many (issue #23) #113

Merged
merged 5 commits into from
Jan 20, 2023
Merged

Fix for add_many (issue #23) #113

merged 5 commits into from
Jan 20, 2023

Conversation

tgodden
Copy link
Contributor

@tgodden tgodden commented Dec 21, 2022

Description

Fixed issue #23.

Explanation

An addition of two n-bit number can at most be an n+1-bit number. So for m n-bit numbers, the result will be at most ceil(log2(m)) + n bits long.

I am not sure how to write these unit tests, because group size varies drastically between tested curves, any suggestions are appreciated.

  • Targeted PR against correct branch (master)
  • Linked to Github issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • Wrote unit tests
  • Updated relevant documentation in the code
  • Added a relevant changelog entry to the Pending section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

@Pratyush
Copy link
Member

Thanks for the fix!

@Pratyush
Copy link
Member

Re: tests, we don't need to test every edge case (as that is infeasible in this case anyway), so we can just focus on a good number of inputs (say, 25), and a single field (say bls12_381::Fr).

@Pratyush Pratyush merged commit 69003c8 into arkworks-rs:master Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants